Xbasic

EVERY_RECORD_LIST Function

Syntax

Record_List as C = every_record_list(C order ,N every [,C filter])

Arguments

order

Optional. Default = "" (record number order). A character order expression that sorts selected records.

every

A integer number that specifies the interval to sample records. For example: Number = 1 retrieves all records. Number = 2 retrieves every second record. Numeric

filter

Optional. Default = ".T." (All records). A character filter expression that evaluates to a logical value and selects records from the table.

Returns

Record_List

A list of the record numbers from the current table.

Description

Returns a list of record numbers for an open layout.

Discussion

The EVERY_RECORD_LIST() function returns a list of record numbers. The function samples records, based on the Number parameter. This function should be used in the context of an open layout.

Example

This code was placed under the OnPush event of a button on a form. It returns the record number of the tenth record after the table was sorted in lastname order.

list = every_record_list("lastname",10)
ui_msg_box("Every Record", list)

Limitations

Desktop applications only.

See Also